package com.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.dao.DepartmentDao;
import com.entity.Department;
import com.entity.Pagination;

@Service
public class DepartmentServiceImp implements DepartmentService {
	@Autowired
	private DepartmentDao departmentDao;

	@Override
	public List<Department> getAllDepartments(Pagination pagination,Department department) {
		return departmentDao.getAllDepartments(pagination,department);
	}

	@Override
	public Integer insertDepartment(Department department) {
		return departmentDao.insertDepartment(department);
		
	}

	@Override
	public Integer deleteDepartment(Department department) {
		return departmentDao.deleteDepartment(department);
	}

	@Override
	public int countAll(Department department) {
		return departmentDao.countAll(department);
	}

	@Override
	public Integer updateDepartment(Department department) {
		return departmentDao.updateDepartment(department);
	}

	@Override
	public Department findById(Integer id) {
		return departmentDao.findById(id);
	}
}
